package com.hdsx.netty.rpcserver.nio.provider;

import com.hdsx.netty.api.OrderServer;
import com.hdsx.netty.api.bean.Order;

import java.util.UUID;

/**
 * @author 占贤银
 * time 2024/8/8 23:04
 * description 生命之灯因热情而点燃，生命之舟因拼搏而前行
 */
public class OrderServerImpl implements OrderServer {
    @Override
    public String getOrderMsg() {
        return "我只是一个订单服务(Bio)";
    }

    @Override
    public String getOrderMsg(String id) {
        return "我只是一个订单服务(Bio)，id = " + id;
    }

    @Override
    public Order getOrder() {
        String id = UUID.randomUUID().toString();
        Order order = new Order(id, "猪肚");
        return order;
    }

    @Override
    public Order getOrder(Order order) {
        return order;
    }
}
